-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add USB support #69
base: master
Are you sure you want to change the base?
Add USB support #69
Conversation
f0ce6e0
to
99bae21
Compare
@dlech This adds enough functionality to push programs. I'm still working on receiving data from the device. |
I added a branch with a few more changes here: https://github.com/pybricks/pybricksdev/tree/dlech-usb |
db05dcf
to
335903e
Compare
@dlech This now processes stdout and status messages. Marking as ready for review. |
Cool! It will probably be a few weeks before I can have a close look. |
d769458
to
3456029
Compare
170da39
to
da4e389
Compare
c705276
to
540e6d3
Compare
New patchset using transport composition class. Still uses UUIDs instead of separate endpoints. |
6493165 is going to be a disruptive breaking change. I agree it is better to do things in the constructor but I am undecided if it is that much better that it is worth breaking people's programs. Edit: after reviewing the code and seeing how many projects on GitHub are using pybricksdev, I'm thinking it would be best not to make this particular change. |
22e7113
to
963b578
Compare
Waiting for command responses now works. I need to clean up the pybricks-micropython code a bit and will then push that up. |
Adds an abstract base class for transport functionality and moves all BLE logic into a new subclass. Signed-off-by: Nate Karstens <[email protected]>
Improves abstraction of transport functionality by adding methods that perform the desired actions and moving direct communication into the transport class. Signed-off-by: Nate Karstens <[email protected]> Co-authored-by: David Lechner <[email protected]>
Renames the import for finding BLE devices to better differentiate it from a future import to find USB devices. Signed-off-by: Nate Karstens <[email protected]>
We were starting to get repeated defines of USB stuff, so let's put it all in one place.
This adds constants for the Pybricks USB device class, subclass and protocol. These are used to identify hubs running the Pybricks firmware when connected via USB. The `usb` command of the CLI is modified to only accept Pybricks hubs now. If we still want to support running programs on hubs running official LEGO firmware, we can add that back with a different command name. Co-authored-by: Nate Karstens <[email protected]>
2e56b0d
to
4c5ddff
Compare
Adds a new transport to manage USB connections. Signed-off-by: Nate Karstens <[email protected]>
Adds USB support in concert with pybricks/pybricks-micropython#208